/*
 * @Description:
 * @Author: cgt
 * @Date: 2021-12-23 14:05:56
 * @LastEditors: cgt
 * @LastEditTime: 2021-12-28 19:04:30
 */
/**
 * @module utils/LoadingUtil
 * @desc 加载遮罩工具
 */

import { Loading } from 'element-ui';

class LoadingUtil {
  constructor() {
    this.instance = null;
  }

  /**
   * 打开加载遮罩
   * @param {Object} options 配置参数
   */
  open(options) {
    this.instance = Loading.service(options);
    console.log(this.instance);
  }

  /**
   * 关闭加载遮罩
   */
  close() {
    this.instance.close();
  }
}

export default LoadingUtil;
